﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace LibNiconico.NiconicoApi.Videos.Constant
{
    internal static class NicoVideoConstant
    {
        internal const string HOSTNAME = "www.nicovideo.jp";

        internal const string EXT_HOSTNAME = "ext.nicovideo.jp";

        internal const string FLAPI_HOSTNAME = "flapi.nicovideo.jp";

        internal const string MSG_HOSTNAME = "msg.nicovideo.jp";

        private static Uri _nicovideo_url;

        internal static Uri NICOVIDEO_URL
        {
            get
            {
                if (_nicovideo_url == null)
                {
                    _nicovideo_url = new UriBuilder("http", HOSTNAME).Uri;

                }

                return _nicovideo_url;
            }
        }

        private static Uri _ext_nicovideo_url;

        internal static Uri EXT_NICOVIDEO_URL
        {
            get
            {
                if (_ext_nicovideo_url == null)
                {
                    _ext_nicovideo_url = new UriBuilder("http", EXT_HOSTNAME).Uri;
                }

                return _ext_nicovideo_url;
            }
        }


        private static Uri _flapi_url;


        internal static Uri FLAPI_NICOVIDEO_URL
        {
            get
            {
                if (_flapi_url == null)
                {
                    _flapi_url = new UriBuilder("http", FLAPI_HOSTNAME).Uri;
                }
                return _flapi_url;
            }
        }

        private static Uri _msg_url;

        internal static Uri MSG_NICOVIDEO_URL
        {
            get
            {
                if (_msg_url == null)
                {
                    _msg_url = new UriBuilder("http", MSG_HOSTNAME).Uri;
                }
                return _msg_url;
            }
        }

        
    }
}
